﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LiveChartsCore.ConditionalDraw;
using LiveChartsCore.Drawing;
using LiveChartsCore;

namespace TestWpfLiveCharts2.Extensions
{
    public static class LiveChartsExtension
    {
        public static CropRangePaintBuilder<TModel, TVisual, TLabel, TDrawingContext> WithCropRangePaint<TModel, TVisual, TLabel, TDrawingContext>(
            this Series<TModel, TVisual, TLabel, TDrawingContext> series, IPaint<TDrawingContext> paint)
                where TDrawingContext : DrawingContext
                where TVisual : class, IVisualChartPoint<TDrawingContext>, new()
                where TLabel : class, ILabelGeometry<TDrawingContext>, new()
        {
            return new CropRangePaintBuilder<TModel, TVisual, TLabel, TDrawingContext>(series, paint);
        }
    }

}
